#pragma once
#include <string>

class WordCounter {
public:
    struct FileStats {
        int charCount;
        int wordCount;
        int lineCount;
        int sentenceCount;
        int codeLines;
        int blankLines;
        int commentLines;
    };

    static FileStats countFileStats(const std::string& filename);
    static int countCharacters(const std::string& filename);
    static int countWords(const std::string& filename);
    static int countLines(const std::string& filename);
    static int countSentences(const std::string& filename);
    static int countCodeLines(const std::string& filename);
    static int countBlankLines(const std::string& filename);
    static int countCommentLines(const std::string& filename);

private:
    static bool isWhitespace(char c);
    static bool isWordCharacter(char c);
    static bool isSentenceEnd(char c);
    static bool isCommentLine(const std::string& line);
    static bool isCodeLine(const std::string& line);
};